package com.mark.mall.web.platform.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 物料表
 * </p>
 *
 * @author admin
 * @since 2021-02-28
 */
@TableName(value = "t_product")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Product对象", description = "物料表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "物料编码")
    @TableField("c_code")
    private String code;

    @ApiModelProperty(value = "物料名称")
    @TableField("c_name")
    private String name;

    @ApiModelProperty(value = "物料价格")
    @TableField("c_price")
    private BigDecimal price;

    @ApiModelProperty(value = "物料创建时间")
    @TableField(value = "c_createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    @ApiModelProperty(value = "物料状态")
    @TableField(value = "c_state", select = false, fill = FieldFill.INSERT)
    private String state;

    @ApiModelProperty(value = "物料上下架状态")
    @TableField("c_shelfstate")
    private String shelfstate;

    @ApiModelProperty(value = "物料主图")
    @TableField("c_mainurl")
    private String mainurl;

    @ApiModelProperty(value = "物料库存")
    @TableField("c_stock")
    private Integer stock;

    @ApiModelProperty(value = "上架数量")
    @TableField("c_shelfNum")
    private Integer shelfnum;

    @ApiModelProperty(value = "物料单位")
    @TableField("c_unit")
    private String unit;

    @ApiModelProperty(value = "物料搜索字段")
    @TableField("c_searchkeywords")
    private String searchkeywords;

    @ApiModelProperty(value = "供应商id")
    @TableField("c_providerid")
    private String providerId;


}
